<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PersonelEditDlg" widgetVar="PersonelEditDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.EditPersonelTitle}">

            <h:form id="PersonelEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{personelController.selected != null}">

                        <h:outputLabel value="#{bundle.EditPersonelLabel_personelId}" for="personelId" />
                        <h:outputText id="personelId" value="#{personelController.selected.personelId}" />

                        <p:outputLabel value="#{bundle.EditPersonelLabel_personelAd}" for="personelAd" />
                        <p:inputText id="personelAd" value="#{personelController.selected.personelAd}" title="#{bundle.EditPersonelTitle_personelAd}" required="true" requiredMessage="#{bundle.EditPersonelRequiredMessage_personelAd}"/>

                        <p:outputLabel value="#{bundle.EditPersonelLabel_personelSoyad}" for="personelSoyad" />
                        <p:inputText id="personelSoyad" value="#{personelController.selected.personelSoyad}" title="#{bundle.EditPersonelTitle_personelSoyad}" required="true" requiredMessage="#{bundle.EditPersonelRequiredMessage_personelSoyad}"/>

                        <p:outputLabel value="#{bundle.EditPersonelLabel_personelSicilNumarasi}" for="personelSicilNumarasi" />
                        <p:inputText id="personelSicilNumarasi" value="#{personelController.selected.personelSicilNumarasi}" title="#{bundle.EditPersonelTitle_personelSicilNumarasi}" />

                        <p:outputLabel value="#{bundle.EditPersonelLabel_personelPosta}" for="personelPosta" />
                        <p:inputText id="personelPosta" value="#{personelController.selected.personelPosta}" title="#{bundle.EditPersonelTitle_personelPosta}" required="true" requiredMessage="#{bundle.EditPersonelRequiredMessage_personelPosta}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{personelController.save}" value="#{bundle.Save}" update="display,:PersonelListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,PersonelEditDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="PersonelEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
